Generate the endpoint reference from the OpenAPI spec - #12
Conversation
The hand-written resource pages covered 34 of the API's 77 operations, and one of them documented a create-device call that does not exist: the identifier goes in the path, not the body. The API Reference tab now points at the specification the server generates, so the endpoint reference is complete and cannot drift. The spec tags every operation, so it groups by resource rather than arriving as one flat list. Overview and Authentication stay hand-written, since base URLs, response envelopes and status codes are not in the spec. The four resource pages are removed and redirect to the overview. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Deployment: Mintlify could not fetch the spec from the remote URL, so it built with no OpenAPI file at all. The spec is now checked in as openapi.json and referenced by path, which is the mechanism Mintlify uses by default and removes the build's dependency on the production host being reachable. Link-rot: the anchor #device-server-events did not exist. Mintlify keeps the arrow when slugifying, so the real anchor is #device-→-server-events. The link now points at #rebooting, which is the event the sentence is actually about and has a clean slug. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The build reported "Failed to fetch OpenAPI file for anchor or tab" and "Fetched 0 OpenApi file(s)" with the spec on a group, both when it was a remote URL and after it was checked in, so the file was never the problem. Group-level openapi appears not to be picked up by this deployment. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CI diagnosis: the spec itself is invalidThe deployment failure is not a configuration problem in this repo. NervesHub publishes an OpenAPI document that fails OpenAPI 3.0 validation, so Mintlify rejects it and reports Ruled out along the way, each with its own CI run:
Same error in all three, which is what pointed at the document rather than the wiring. The URL is fine on its own: 200, no redirect, Two defects, both in
|
The API Reference tab now builds its endpoint reference from the specification the server generates and serves.
{ "group": "Endpoints", "openapi": "https://manage.nervescloud.com/api/openapi" }What this fixes
The one that did not exist:
The identifier goes in the path, not the body, so anyone following the old "Create a Device" example got a 404. Generating from the spec makes that class of error impossible rather than fixing this one instance.
Newly covered, having been absent entirely: the whole
/api/devices/{identifier}/*short-URL family (reboot, reconnect, upgrade, move, logs, code, scripts, penalty), support scripts, Iroh endpoints, network identities, bulk device import, organization members, signing keys, CLI session auth and platform status.Structure
The spec tags all 77 operations across 16 tags with none untagged, so the generated section groups by resource — Devices, Products, Firmwares, Deployment Groups and so on — rather than arriving as one flat list of 77.
Overview and Authentication stay hand-written. They cover base URLs, the response envelope, and the status code table, none of which the spec carries. Device WebSocket is untouched.
The four resource pages are deleted and redirect to
/api/overview; only one link existed between them, and both ends are gone.Worth knowing
The build now depends on
manage.nervescloud.combeing reachable. Mintlify fetches remote specs at build time. It is public today — 200,application/json, 134 KB, OpenAPI 3.0.0. If you would rather not couple builds to it, the alternative is committing a periodically-refreshed copy, at the cost of freshness.The reference describes NervesCloud. A self-hosted deployment exposes the same API, but an older one may differ. Noted on the overview page, pointing readers at their own
/api/openapi.Please eyeball the preview
I validated
docs.jsonagainst the Mintlify schema, confirmed all 32 remaining hand-written pages resolve, and checked every internal link and redirect. What I cannot verify without a build is how the generated section renders — grouping, ordering and playground behaviour. Worth a look at the preview before merging.🤖 Generated with Claude Code